Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

1.0: Fix wrong description of total retry time #395

Merged
merged 3 commits into from
Mar 31, 2022

Conversation

daipom
Copy link
Contributor

@daipom daipom commented Mar 25, 2022

See also: fluent/fluentd#3649

Before the fix and fluent/fluentd#3640 ,
the both of retry behavior and the document were wrong.

Actual behavior: `c + c + cb^1 + ... + cb^(k-1)` (k+1 retries totally)
Total calculation: `cb^(-1) + c + cb^1 + ... + cb^(k-2)`

Signed-off-by: Daijiro Fukuda <[email protected]>
Copy link
Member

@ashie ashie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

daipom added 2 commits March 31, 2022 14:10
See also: fluent/fluentd#3649

Before the fix, the number was mistakenly 19.
This fixes it to 18.
(The document was also wrong.)

n-th retry is triggered at `2^n - 1` seconds elapsed since the first flush.
So 18-th retry is at 262143 seconds elapsed and this exceeds 72 hours (259200 seconds).
If the next retry is going to exceed this time limit, the last retry will be
made at exactly this time limit.
So the last time is 18.

Signed-off-by: Daijiro Fukuda <[email protected]>
@daipom
Copy link
Contributor Author

daipom commented Mar 31, 2022

I found another wrong description, so fixed it.
In addition, I feel we need examples of retry timings, so I added some.

@ashie ashie merged commit 7df3e8b into fluent:1.0 Mar 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants